package com.pap.product.product.auto.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.pap.base.mapper.PapBaseMapper;
import com.pap.product.agent.item.dto.ItemCheckDTO;
import com.pap.product.agent.product.dto.ProductSelectedDetailsDTO;
import com.pap.product.agent.product.dto.formuladefine.ProductItemDTO;
import com.pap.product.product.auto.entity.ProductDetail;;

public interface ProductDetailMapper extends PapBaseMapper<ProductDetail> {
	int deleteByPrimaryKey(String id);

	int selectCountByMap(Map<Object, Object> map);

	List<ProductDetail> selectListByMap(Map<Object, Object> map);

	ProductDetail selectByPrimaryKeyAndTableName(@Param("id") String id,
			@Param("dynamicTableName") String dynamicTableName);

	int deleteByPrimaryKeyAndTableName(@Param("id") String id, @Param("dynamicTableName") String dynamicTableName);

	int insert(ProductDetail record);

	int insertSelective(ProductDetail record);

	ProductDetail selectByPrimaryKey(String id);

	int updateByPrimaryKeySelective(ProductDetail record);

	int updateByPrimaryKey(ProductDetail record);
	
	
	// alexgaoyh add
	void deleteByProductId(@Param("productId") String productId);
	
	List<ProductSelectedDetailsDTO> selectCheckedProductItems(@Param("productId") String productId);
	
	List<ItemCheckDTO> selectProductDetailForList(@Param("clientLicenseId") String clientLicenseId, @Param("productId") String productId);
	
	/**
	 * 查询产品定义下面包含的融资项目
	 * @param clientLicenseId
	 * @param productId
	 * @return
	 */
	List<ProductItemDTO> selectProductDetailItem(@Param("clientLicenseId") String clientLicenseId, @Param("productId") String productId);
}